<script type="text/javascript" src="${appRoot}/res/lib/jquery.multifile-1.4.6.js"></script>
<script type="text/javascript" src="${appRoot}/res/ui/bundles.js"></script>
<script type="text/javascript">
// <![CDATA[
var startLevel = ${startLevel};
var drawDetails = ${drawDetails};
var currentBundle = ${currentBundle};
var lastBundleData = ${__bundles__};
var i18n = {
	'Symbolic Name'       : '${bundles.name.symb}',
	'Version'             : '${version}',
	'Bundle Location'     : '${bundles.location}',
	'Last Modification'   : '${bundles.lastMod}',
	'Bundle Documentation': '${bundles.doc}',
	'Vendor'              : '${bundles.vendor}',
	'Copyright'           : '${bundles.copyright}',
	'Description'         : '${bundles.description}',
	'Start Level'         : '${bundles.startlevel}',
	'Bundle Classpath'    : '${bundles.classpath}',
	'Exported Packages'   : '${bundles.pkg.exported}',
	'Imported Packages'   : '${bundles.pkg.imported}',
	'Importing Bundles'   : '${bundles.pkg.importingBundles}',
	'Manifest Headers'    : '${bundles.manifest.headers}',
	'Host Bundles'        : '${bundles.hosts}',
	'Fragments Attached'  : '${bundles.framents}',
	'Vendor'              : '${bundles.vendor}',
	// actions
	'Start'               : '${start}',
	'Stop'                : '${stop}',
	'Update'              : '${bundles.update}',
	'Uninstall'           : '${bundles.uninstall}',
	'Refresh Package Imports' : '${bundles.refreshImports}',
	//
	statlinePrefix        : '${bundles.statline.prefix}',
    statlineAll           : '${bundles.statline.all}',
    statlineTotal         : '${bundles.statline.total}',
    statlineActive        : '${bundles.statline.active}',
    statlineFragments     : '${bundles.statline.fragments}',
    statlineResolved      : '${bundles.statline.resolved}',
    statlineInstalled     : '${bundles.statline.installed}',
	install_update        : '${bundles.install_or_update}',
	filterNoMatch         : '${bundles.filter.no_match}',
	state                 : {
		1  : '${bundles.state.1}', // uninstalled
		2  : '${bundles.state.2}', // installed
		4  : '${bundles.state.4}', // resolved
		8  : '${bundles.state.8}', // starting
		16 : '${bundles.state.16}', // stopping
		32 : '${bundles.state.32}', // active
		'unknown' : '${bundles.state.unknown}', // Unknown State: {0}
		'fragment' : '${bundles.state.fragment}' // Fragment
	}
}
// ]]>
</script>

<!-- status line -->
<p class="statline">&nbsp;</p>

<!-- top header -->
<form method="post" enctype="multipart/form-data" action="" class="filterForm">
	<div class="ui-widget-header ui-corner-top buttonGroup">
		<div class="filterBox">
			<input  class="filter" value="" title="${bundles.filter.help}" />
			<span   class="filterClear ui-icon ui-icon-close" title="${bundles.filter.clear}">&nbsp;</span>
			<button class="filterApply" title="${bundles.filter.help}">${bundles.filter.apply}</button>
			<button class="filterLDAP"  title="${bundles.filter.ldap.tip}">${bundles.filter.ldap}</button>
		</div>
		<button class="reloadButton" type="button">${reload}</button>
		<button class="installButton" type="button">${bundles.install_update}</button>
		<button class="refreshPackages" type="button">${bundles.refreshPkg}</button>
	</div>
</form>

<table id="plugin_table" class="tablesorter nicetable noauto">
	<thead>
		<tr>
			<th class="col_Id">${id}</th>
			<th class="col_Name">${bundles.name}</th>
			<th class="col_Version">${version}</th>
			<th class="col_Symbolic_Name">${bundles.category}</th>
			<th class="col_Status">${bundles.status}</th>
			<th class="col_Actions">${bundles.actions}</th>
		</tr>
	</thead>
	<tbody>
		<tr><!-- template -->
			<td>&nbsp;</td><!-- ID -->
			<td>
				<div class="bIcon ui-icon ui-icon-triangle-1-e" title="Show Details">&nbsp;</div>
				<div class="bName">&nbsp;</div> <!-- here goest bundle name/link -->
			</td>
			<td>&nbsp;</td><!-- version -->
			<td>&nbsp;</td><!-- symbolic name -->
			<td>&nbsp;</td><!-- status -->
			<td><!-- actions -->
				<ul class="icons ui-widget">
					<li class="dynhover" title="${start}"><span class="ui-icon ui-icon-play">&nbsp;</span></li>
					<li class="dynhover" title="${stop}"><span class="ui-icon ui-icon-stop">&nbsp;</span></li>
					<li class="dynhover" title="${bundles.refreshImports}"><span class="ui-icon ui-icon-refresh">&nbsp;</span></li>
					<li class="dynhover" title="${bundles.update}"><span class="ui-icon ui-icon-transferthick-e-w">&nbsp;</span></li>
					<li class="dynhover" title="${bundles.uninstall}"><span class="ui-icon ui-icon-trash">&nbsp;</span></li>
				</ul>
			</td>
		</tr>
	</tbody>
</table>

<!-- bottom header -->
<form method="post" enctype="multipart/form-data" action="" class="filterForm">
	<div class="ui-widget-header ui-corner-bottom buttonGroup">
		<div class="filterBox">
			<input  class="filter" value="" title="${bundles.filter.help}" />
			<span   class="filterClear ui-icon ui-icon-close" title="${bundles.filter.clear}">&nbsp;</span>
			<button class="filterApply" title="${bundles.filter.help}">${bundles.filter.apply}</button>
			<button class="filterLDAP"  title="${bundles.filter.ldap.tip}">${bundles.filter.ldap}</button>
		</div>
		<button class="reloadButton" type="button">${reload}</button>
		<button class="installButton" type="button">${bundles.install_update}</button>
		<button class="refreshPackages" type="button">${bundles.refreshPkg}</button>
	</div>
</form>

<!-- status line -->
<p class="statline">&nbsp;</p>

<div id="uploadDialog" class="ui-helper-hidden" title="${bundles.upload.caption}">
	<form method="post" enctype="multipart/form-data" action="${pluginRoot}">
	<table class="nicetable">
		<tr>
			<td style="text-align:right">${bundles.upload.start}</td>
			<td>
				<input type="hidden" name="action" value="install"/>
				<input type="checkbox" name="bundlestart" value="start"/>
			</td>
		</tr>
        <tr>
            <td style="text-align:right">${bundles.refreshPkg}</td>
            <td>
                <input type="checkbox" name="refreshPackages" value="refresh"/>
            </td>
        </tr>
		<tr>
			<td style="text-align:right">${bundles.upload.level}</td>
			<td><input type="text" name="bundlestartlevel" id="bundlestartlevel" value="${startLevel}" size="4"/></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>
				<input class="multi" accept="jar|war" type="file" name="bundlefile" />
			</td>
		</tr>
	</table>
	</form>
</div>

<div id="bundleOpError" class="ui-helper-hidden" title="${bundles.error.title}"><pre>&nbsp;</pre></div>
<div id="bundleOpSuccess" class="ui-helper-hidden" title="${bundles.success.title}">${bundles.success.text}</div>
